@charset "utf-8";
/* 全局样式 */
*, ::after, ::before {
    box-sizing: border-box;
}

ul, li {
    margin: 0;
    padding: 0;
    list-style: none;
}

a, a:hover, a:active, a:visited, a:link {
    text-decoration: none;
    color: #222222;
    background-color: transparent;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif;
    font-size: 14px;
    color: #222222;
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* 禁止页面滚动 */
    transform: translate3d(0, 0, 0);
}

#viewer-container {
    position: relative;
    top: 0;
    flex-grow: 1;
    box-sizing: border-box;
    overflow: auto;
    background-color: #323639;
    height: calc(100% - 92px);
    opacity: 0;
    animation: fadeIn 1s forwards;
    animation-delay: 0.1s;
    transform: translate3d(0, 0, 0);
    transition-duration:200ms;
    transition-timing-function:ease;
    outline: none;
    --scale-round-x:1px;
    --scale-round-y:1px;
}

.page-container {
    position: relative;
    width: 100%;
    height: auto;
    direction: ltr;

    /*transform: translate3d(0, 0, 0);*/

    overflow: visible;
    background-clip: content-box;
    margin: 0 auto;
}

.page-container + .page-container {
    margin-top: 5px;
}

.page-canvas {
    width: 100%;
    height: auto;
    z-index: 1;
}

.draw-canvas {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    height: auto;
    z-index: 2;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* 遮罩层 */
.mask {
    position: fixed;
    z-index: 9999;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.5);
}

#custom-canvas {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    pointer-events: none;
    z-index: 1;
}

#touch-circle {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    pointer-events: none; /* 确保不会干扰用户的触摸操作 */
    z-index: 999999999;
    display: none; /* 默认隐藏触摸点 */
}

#page {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 页码 */
.page-num {
    position: fixed;
    top: 30px;
    right: 10px;
    font-size: 18px;
    background-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.5);
    height: 34px;
    z-index: 100;
    padding: 2px 8px;
    line-height: 30px;
    border-radius: 10px;
}

/** 工具栏 */
#toolbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 92px;
    display: flex;
    z-index: 100;
    background-color: #ffffff;
    box-shadow: 0 -1px 0 0 #F2F2F2, 0 -10px 20px 0 rgba(147, 147, 147, 0.14);
    align-items: center;
    justify-content: center;
}

#toolbar .btn-wrap {
    display: flex;
    border-radius: 15px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 92px;
    height: 72px;
    transition: background-color 0.3s ease-in-out;
}

#toolbar .active {
    background-color: #195DDA;
    color: #ffffff;
    transition: background-color 0.3s ease-in-out;
}

#toolbar .btn-icon {
    width: 24px;
    height: 24px;
    background-size: cover;
}

#toolbar #changeDrawer .btn-icon {
    background-image: url('../../static/icon/overview.png')
}

#toolbar #changeDrawer.active > .btn-icon {
    background-image: url('../../static/icon/overview-active.png')
}

#toolbar #sign .btn-icon {
    background-image: url('../../static/icon/sign.png')
}

#toolbar #sign.active > .btn-icon {
    background-image: url('../../static/icon/sign-active.png')
}

#toolbar .btn-text {
    font-size: 17px;
    margin-top: 6px;
}

/* 对话框 */
.dialog {
    background: #fff;
    position: fixed;
    z-index: 10000;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    display: none;
}


.dialog .dialog-title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    line-height: 44px;
    padding: 10px 0;
    background: #F4F8FF;
    border-radius: 36px 36px 0 0;
}

.dialog .dialog-content {
    min-width: 300px;
    min-height: 80px;
    font-size: 16px;
    line-height: 1.5;
    padding: 15px;
}

.dialog .btn-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid #cccccc;
}

.dialog .btn-wrap .btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    line-height: 44px;
    border-left: 1px solid #cccccc;
    font-size: 20px;
}

.dialog .btn-wrap .btn:first-child {
    border-left: none;
}

.dialog-fadeOut {
    animation: fadeOut .3s;
}

.dialog-fadeIn {
    animation: fadeIn .3s;
}

@keyframes fadeIn {
    0% {
        opacity: 0
    }
    100% {
        opacity: 1
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1
    }
    100% {
        opacity: 0
    }
}

/* 缩放比例对话框 */
.dialog.zoom .dialog-content .item {
    padding: 5px 5px 5px 40px;
    line-height: 1.7;
    background-color: #ebf6ff;
    border-radius: 10px;
}

.dialog.zoom .dialog-content .item:last-child {
    margin-bottom: 0;
}

.dialog.zoom .dialog-content .item > .title {
    font-size: 18px;
}

.dialog.zoom .dialog-content .item > .description {
    font-size: 14px;
    color: #5b5b66;
}

.dialog.zoom .dialog-content .item.on {
    box-sizing: border-box;
    border: 2px solid #195DDA;
}

#dialog-zoom .dialog-content {
    display: flex;
    gap: 30px;
    padding: 30px;
}

#dialog-zoom .dialog-content .title {
    font-size: 21px;
    font-weight: bold;
    margin-bottom: 9px;
}

#dialog-zoom .dialog-content .description {
    font-size: 18px;
}

#dialog-zoom .dialog-content > div {
    padding: 25px;
    background: #F4F8FF;
    width: 200px;
}

/* 跳转到对话框 */
.dialog.goto .dialog-content .btn {
    font-size: 18px;
    display: inline-block;
    margin-right: 8px;
    height: 46px;
    line-height: 46px;
    padding: 0 15px;
    background-color: #6f9bf6;
    border-radius: 9px;
    color: #ffffff;
}

.dialog.goto .dialog-content .goto-num-label {
    font-size: 18px;
}

.dialog.goto .dialog-content .goto-num {
    font-size: 18px;
    width: 60px;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #909090;
    text-align: center;
}

.dialog.goto .dialog-content .goto-num:focus {
    outline: none;
    border-bottom: 1px solid #0058ff;
}

.dialog.goto .dialog-content .page-info {
    font-size: 22px;
    text-align: center;
    line-height: 2;
    margin-bottom: 8px;
}

.dialog.goto .dialog-content .page-info > span {
    font-weight: bold;
    display: inline-block;
    margin-right: 8px;
}

/* 跳转到对话框 */
.dialog.eye .dialog-content {
    padding: 40px;
    background-color: #FFFFFF;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.dialog.eye .dialog-content .color-wrap {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 1px solid #c1c1c1cc;
}

.dialog.eye .dialog-content .color-text {
    display: none;
}

.dialog.eye .dialog-content div.on .color-wrap {
    border: 1px solid #0058ffcc;
}

.dialog.eye .dialog-content div.on .color-text {
    color: #0058ff;
    font-weight: bold;
}

/* PDF 显示区域 */
.viewer-container {
    flex: 1;
    width: 100%;
    outline: none;
    background-color: #ffffff;
    text-align: center;
}

.viewer-container .page {
    position: relative;
    width: 100%;
    height: 100%;
    box-shadow: 0 1px 2px #cccccc;
    margin: 0 auto;
    overflow: auto;
}


/*.viewer-container > canvas {*/
/*    width: 100%;*/
/*    height: 100%;*/

/*}*/

/* 高亮显示区 */
.highlight-canvas {
    background-color: rgba(255, 0, 0, 0.2);
}

/* 横屏CSS */
@media screen and (orientation: portrait) {
    .toolbar .btn > span {
        display: none;
    }
}

/**
 * 签批按钮子按钮
 */
#sign-type {
    position: fixed;
    right: 20px;
    bottom: 130px;
    display: none;
    z-index: 999;
}


#sign-type .btn-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    width: 70px;
    height: 70px;
    background: #FFFFFF;
}


#sign-type .btn-icon {
    width: 32px;
    height: 32px;
    background-size: cover;
}

#sign-type .btn-text {
    margin-top: 4px;
}

#sign-type #pen .btn-icon {
    background-image: url('../../static/icon/pen.png');
}

#sign-type #pen.active .btn-icon {
    background-image: url('../../static/icon/pen-active.png');
}

#sign-type #hand .btn-icon {
    background-image: url('../../static/icon/hand.png');
}

#sign-type #hand.active .btn-icon {
    background-image: url('../../static/icon/hand-active.png');
}

#sign-type #eraser .btn-icon {
    background-image: url('../../static/icon/eraser.png');
}

#sign-type #eraser.active .btn-icon {
    background-image: url('../../static/icon/eraser-active.png');
}

#sign-type .btn-wrap.active {
    background-color: #3861ff;
    color: #ffffff;
}

#sign-type .btn-wrap {
    margin-top: 0;
}

#sign-type .type-group {
    padding: 0;
    margin-top: 10px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 13px 0 rgba(147, 147, 147, 0.23);
    border: 1px solid #EFEFEF;
}

/**
缩略图抽屉样式
 */
.drawer {
    position: relative;
    left: -150px;
    width: 0;
    height: calc(100% - 92px);
    background-color: #323639;
    /*//纵向滑动*/
    overflow-y: auto;
    overflow-x: hidden;
    text-align: center;
    padding: 20px 0;
}

.drawer.open {
    flex-shrink: 0;
    width: 150px;
    left: 0;
    padding-top: 110px;
}

.content {
    padding: 20px;
}

.drawer-item {
    position: relative;
    width: 100%;
    height: 170px;
}
.drawer-item+.drawer-item{
    margin-top: 30px;
}

.drawer-item::after {
    content: attr(data-page);
    position: absolute;
    display: flex;
    width: 100%;
    color: #ffffff;
    font-size: 18px;
    justify-content: center;
    box-sizing: border-box;
}

.drawer-item::before {
    content: '';
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    margin: 0 auto;
    display: flex;
    width: 80%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.drawer-item .thumbnail {
    scale: 1;
    transition: all 0.3s ease;

}

#drawer .drawer-item.active::before {
    background: rgba(0, 0, 0, 0);
    transition: all 0.3s ease !important;
    border: 5px solid #5284E7FF !important;
    box-sizing: border-box;
}

#drawer .drawer-item .thumbnail.active::after {
    background: transparent;
}

/* 自定义滚动条样式 */
.drawer::-webkit-scrollbar {
    width: 0; /* 设置滚动条宽度 */
}

.drawer::-webkit-scrollbar-thumb {
    background-color: #c1c1c1; /* 设置滚动条 thumb 颜色 */
    border-radius: 2px; /* 设置滚动条 thumb 圆角 */
}

.drawer::-webkit-scrollbar-track {
    background-color: #eee; /* 设置滚动条轨道颜色 */
    border-radius: 2px; /* 设置滚动条轨道圆角 */
}

.disabled {
    color: gray;
    opacity: 0.3;
    pointer-events: none;
}

.disabled .btn-icon {
    filter: grayscale(100%);
}